-- GENERATED SPELL FOR [Desert Rager] --


function spell0_11747(pUnit, Event) --@Earth Shock,n/a--
pUnit:FullCastSpellOnTarget(13728,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11747', 2330, 1)
end

function spell1_11747(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(8599,pUnit)
pUnit:RegisterEvent('Sorts_11747', 606, 1)
end

function Sorts_11747(pUnit, Event)
local choix_sorts_11747 = math.random(0, 1)
if choix_sorts_11747 == 0 then
pUnit:RegisterEvent('spell0_11747', 1, 1)
end
if choix_sorts_11747 == 1 then
pUnit:RegisterEvent('spell1_11747', 1, 1)
end
end

function mob11747_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_11747', math.random(1500, 3000), 1)
end

function mob11747_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11747_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11747_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(11747, 1, 'mob11747_Action')
RegisterUnitEvent(11747, 2, 'mob11747_Leave')
RegisterUnitEvent(11747, 3, 'mob11747_Kill')
RegisterUnitEvent(11747, 4, 'mob11747_Die')
